package com.longsichao.lscframe.app;

import android.app.Application;
import android.content.Context;

import com.jakewharton.picasso.OkHttp3Downloader;
import com.longsichao.lscframe.net.HttpConnection;
import com.squareup.picasso.Picasso;

/**
 * @author SONG GUANYULONGSICHAO (leo.song[at]outlook[dot]com)
 */
public class LSCApplication extends Application {
    public static Context applicationContext = null;

    @Override
    public void onCreate() {
        super.onCreate();
        applicationContext = getApplicationContext();

        Picasso picasso = new Picasso.Builder(applicationContext).downloader(new OkHttp3Downloader(HttpConnection.getHttpClient())).build();
        Picasso.setSingletonInstance(picasso);
    }

}
